//
//  NSString+XX.m
//
//  Created by Shaw
//

#import "NSString+XX.h"

@implementation NSString (XX)
/**
 *  判断字符串是否为空
 */
+(BOOL)isBlank:(NSString *)string{
    if (string == nil || string == NULL) {
        return YES;
    }
    if ([string isKindOfClass:[NSNull class]]) {
        return YES;
    }
    if ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
        return YES;
    }
    return NO;
}
/*
 *  去掉所有空格
 */
+(NSString*)removeAllWhiteSpace:(NSString*)target;
{
    if ([target containsString:@" "]) {
        target = [target stringByReplacingOccurrencesOfString:@" " withString:@""];
    };
    return target;
}

@end
